﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.Lottery.KaiJiamgModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	手动开奖
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<fieldset class="fieldset">
    <legend>手动开奖</legend>
    <% Html.BeginForm(new { id="kaijiangform"},null); %>
    <table width="100%" class="table">
        <% if (!ViewData.ModelState.IsValid) %>
        <%{ %>
        <tr><td>
            <%=Html.ValidationMessage("Error") %>
        </td></tr>
        <%} %>
        <tr>
            <td>
                <label for="Lottery">请选择彩种：</label>
                <%=Html.DropDownListFor(p=>p.Lottery,Model.Lotterys.Each(p=>p.Selected=p.Value==Model.Lottery.ToString())) %>
                <%=Html.ValidationMessageFor(p=>p.Lottery) %>
            </td>
            <td>
                <label for="IssueID">请选择期号</label><div id="div_issueid" style="display:inline">
                <%=Html.DropDownListFor(p => p.IssueID, Model.Issues.Each(p => p.Selected = p.Value == Model.IssueID.ToString()))%></div>
                <%=Html.ValidationMessageFor(p=>p.IssueID) %>
            </td>
            <td>
                <label for="OpenCode">开奖号码：</label>
                <%=Html.TextBoxFor(p => p.OpenCode, new { @class="text80"})%>
                <%=Html.ValidationMessageFor(p=>p.OpenCode) %>
            </td>
            <td>
                <input type="submit" value="开奖" onclick="return confirm('确定提交吗？')" />
            </td>
        </tr>
    </table>
    <% Html.EndForm(); %>
</fieldset>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
    <script type="text/javascript">
        var url = '<%=Url.Action("KaiJiangIssue") %>';
        $(document).ready(function () {
            $("#kaijiangform #Lottery").change(function () {
                var val = this.value;
                if (val == "")
                    $("#div_issueid select").remove("option[value^='']");
                else {
                    $("#div_issueid").load(url, { id: val }, function () {
                        $("site_main").parent().unblock();
                    });
                    $("site_main").parent().block();
                }
            });
        });
    </script>
</asp:Content>
